/*
 * FormFillerRegister.h
 *
 *  Created on: 27/01/2009
 *      Author: desadoc
 */

#ifndef FORMFILLERREGISTER_H_
#define FORMFILLERREGISTER_H_

#include <QTextStream>
#include <QList>
#include <QVBoxLayout>

#include <QWidget>

#include "FormFillerField.h"

class FormFillerRegister : public QWidget
{
	Q_OBJECT

public:

	FormFillerRegister(void);
	FormFillerRegister(const FormFillerRegister& r);

	friend QTextStream& operator<<(QTextStream& s, FormFillerRegister& r);
	friend QTextStream& operator>>(QTextStream& s, FormFillerRegister& r);

private:

	QList<FormFillerField*> fields;
	QVBoxLayout* layout;

public:

	void addField(FormFillerField* f)
	{
		fields.push_back(f);
		layout->addWidget(f);
	}
};

FormFillerRegister* readFromTald(QTextStream* s);

#endif /* FORMFILLERREGISTER_H_ */
